#!/bin/bash

# Amazon爬虫定时任务脚本
# 通过crontab每30分钟执行一次

# 设置工作目录
cd /home/root_hm/project/project_python/inventory-small-tool-backend

# 激活虚拟环境
source .venv/bin/activate

# 设置环境变量
export PYTHONPATH=/home/root_hm/project/project_python/inventory-small-tool-backend

# 执行爬虫任务并将输出记录到日志文件
python crawProj/distributed_weibo_spider/run_amazon_spider.py >> /home/root_hm/project/project_python/inventory-small-tool-backend/crawler_cron.log 2>&1